Open
Conversation
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
alicecaron
reviewed
Feb 26, 2026
olperr1
requested changes
Feb 27, 2026
Comment on lines
+351
to
+356
| return exportOptions.isSorted() ? StreamSupport.stream(identifiables.spliterator(), false) | ||
| .sorted(Comparator.comparing(Identifiable::getId)) | ||
| .collect(Collectors.toList()) | ||
| : identifiables; | ||
| : StreamSupport.stream(identifiables.spliterator(), false) | ||
| .sorted(Comparator.comparing(Identifiable::getSortIndex)) | ||
| .collect(Collectors.toList()); |
Member
There was a problem hiding this comment.
Only the comparator is different between the 2 alternatives. It would be cleaner to choose the comparator first and then to execute the processing with it.
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/Identifiable.java
Outdated
Show resolved
Hide resolved
| /** | ||
| * Get the sort index of the object. | ||
| */ | ||
| long getSortIndex(); |
Member
There was a problem hiding this comment.
A test should be added in the TCK to ensure that the custom IIDM implementations handle it correctly.
alicecaron
reviewed
Feb 27, 2026
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/NetworkIndex.java
Outdated
Show resolved
Hide resolved
iidm/iidm-impl/src/main/java/com/powsybl/iidm/network/impl/AbstractIdentifiable.java
Outdated
Show resolved
Hide resolved
iidm/iidm-impl/src/test/java/com/powsybl/iidm/network/impl/VariantManagerImplTest.java
Show resolved
Hide resolved
iidm/iidm-impl/src/test/java/com/powsybl/iidm/network/impl/VariantManagerImplTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
Signed-off-by: Giovanni Ferrari <giovanni.ferrari@soft.it>
Signed-off-by: CARON Alice <alice.caron@rte-france.com>
2cd41c5 to
e61c93e
Compare
alicecaron
previously approved these changes
Mar 3, 2026
Signed-off-by: CARON Alice <alice.caron@rte-france.com>
e61c93e to
c15bfe5
Compare
|
alicecaron
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Fixes #3674
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Implementations of
Identifiableinterface should implement the newgetSortIndexmethod.Other information: